<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
    
    /*
     *  Routing Info
     */
    public function _initRouter()
    {
        
        $frontController = Zend_Controller_Front::getInstance();
        $config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/routes.ini');
        $router = $frontController->getRouter();
        $router->addConfig($config,'routes');
        
        //setup dojo library
        $view = new Zend_View();
        Zend_Dojo::enableView($view);
        $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
        $viewRenderer->setView($view);
            
        
        Zend_Session::start();
    }   
    
    
    protected function _initAutoload() {
        $autoLoader = Zend_Loader_Autoloader::getInstance();

        $resourceLoader = new Zend_Loader_Autoloader_Resource(array(
                'basePath' => APPLICATION_PATH,
                'namespace' => '',
            ));

        $resourceLoader->addResourceType('validate', 'library/', 'CV_Validate_');

        $autoLoader->pushAutoloader($resourceLoader);

    }    
    
    
}

